package test.junit;

import java.sql.SQLException;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.ScalarHandler;
import org.junit.Test;

import cn.itcast.jdbc.TxQueryRunner;

public class Tools {

	@Test
	public void test() throws SQLException{
		
			String sql = "select count(1) from t_user where loginname = ?";
			QueryRunner qr = new TxQueryRunner();
			Number number = (Number)qr.query(sql, new ScalarHandler(),"abc");
			System.out.println(number.intValue()); 
		
	}
}
